package com.dao;

import com.entity.Td_newstype;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface NewsTypeDao extends JpaRepository<Td_newstype,Integer> {

    /**
     * 根据父id查询子节点
     * @param fatherId 父id
     * @return
     */
    @Query(value = "select * from Td_newstype where FD_FatherLevelID=?",nativeQuery = true)
    public List<Td_newstype> getAllByFD_FatherLevelID(int fatherId);
}
